Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[*] Make operator compatible with Kubernetes 1.22 #325

Merged
merged 4 commits into from
Jun 28, 2022

Conversation

schallert
Copy link
Collaborator

@schallert schallert commented Jun 27, 2022

  • Remove API references to v1beta1 CRD API. Previously the operator
    installed the CRD itself, but with 1.22 it's more common to install
    the CRD separately (since the schema is fully included in the CRD
    definition).
  • Generate the CRD manifest using controller-gen.

This has been successfully tested in the two main upgrade / install paths:

  • Upgrading on a 1.21 cluster that had the previous CRD version installed. Steps to upgrade were to 1) apply the new CRD definition, and 2) upgrade the operator.
  • Installing from scratch on a 1.22 cluster. Steps were to simply apply bundle.yaml.

A separate PR will update the docs. Then we'll cut a release so that users don't have to install/apply the operator from the main branch.

Fixes #323.

- Remove API references to v1beta1 CRD API. Previously the operator
  installed the CRD itself, but with 1.22 it's more common to install
  the CRD separately (since the schema is fully included in the CRD
  definition).
- Generate the CRD manifest using `controller-gen`.

Fixes #323.
@schallert schallert marked this pull request as ready for review June 27, 2022 22:44
Copy link
Collaborator

@jeromefroe jeromefroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 🎉 🎉

- name
- value
type: object

Copy link

@jnyi jnyi Jun 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @schallert,

Thank you for making this change. I am from Databricks, I've applied the CRD change and build a docker image from this PR to test it out, however the m3db-operator was stuck without creating the m3db-cluster. Any clues about how to debug this? The m3db-operator only produces 5 lines of logs:

~/universe (m3db-operator) $ klgf m3db-operator-0
{"level":"info","ts":"2022-06-28T03:31:24.779Z","msg":"using InCluster k8s config"}
{"level":"info","ts":"2022-06-28T03:31:24.875Z","msg":"starting Operator controller","controller":"m3db-cluster-controller"}
{"level":"info","ts":"2022-06-28T03:31:24.876Z","msg":"waiting for informer caches to sync","controller":"m3db-cluster-controller"}
{"level":"info","ts":"2022-06-28T03:31:25.881Z","msg":"starting workers","controller":"m3db-cluster-controller"}
{"level":"info","ts":"2022-06-28T03:31:25.881Z","msg":"workers started","controller":"m3db-cluster-controller"}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jnyi what k8s version is your cluster on? Do you have any other debugging info you can share, i.e. what happens when you do kubectl describe m3dbcluster $CLUSTER?

I haven't been able to reproduce this in any of our environments but definitely want to track it down if it's an issue w/ the operator.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a heads up I'm going to land this so we can work on docs. @jnyi if you're on the M3 slack, feel free to ping me and we'll see if we can debug the issue. I'll wait until I hear from Databricks that this is working before we cut a release.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will contact you in M3 slack channel.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for helping out, tested this change is compatible with kubernetes v1.22

@schallert schallert merged commit 0484dcc into master Jun 28, 2022
@schallert schallert deleted the schallert/controller_gen branch June 28, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

m3db-operator is not compatible with kubernetes v1.22
3 participants